package com.foreknow.dao;


import com.foreknow.model.Business;

import java.sql.SQLException;
import java.util.List;

public interface BusinessDao {
    /**
     * 添加信息
     * @param business
     * @return
     */
    public boolean save(Business business)throws SQLException;

    /**
     * 查询所有信息
     * @return
     * @throws SQLException
     */
    public List<Object> getQueryAll()throws SQLException;

    /**
     * 根据id修改
     * @param business
     * @param id
     * @return
     * @throws SQLException
     */
    public int Update(Business business,int id)throws SQLException;

    /**
     * 根据Id查询留言信息
     * @param businessName
     * @return
     * @throws SQLException
     */
    public List<Object> getQueryByName(String businessName)throws SQLException;

    /**
     * 根据id删除信息
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean deleteById(int id)throws SQLException;
}
